Added movement state recorders. Fixed the bugs again (hopefully).