movement improvements, cleaned up some code