State code and basic movement now works.