Reorganized code. Moved motion control out of information fragment.