Refactored some code

Movement is broken. Need to fix