Mostly Debugged.

All that remains is the mass movement function.