Optimize motor parameter; some cosmetics