Direction changing now works.

Also added code for maintaining cube direction.
Commit before hour of code.