Removed unused function motor control