Completed motor control function and game shutdown coding