There could be other problems, but what I see immediately is that you write:
--ape) THING='ape';shift;;
(and similarly for other cases) and then do:
shift
after the case is done. This means that in the case of --ape
and many other cases, you are shift
ing twice.
Simply remove the shift
inside the cases and do a shift once and for every case after esac
.