get rid of #define max and use stl::max
use ceilf instead of ceil
make minimum step rate settabl ewith M205
use floorf isntead of floor