Fixed bugs on motor x-end

I fixed a lot of bugs on the motor x-end. It is now more parametric. I
also changed the block, it uses more material now. I might change it
back.