fixes and improvements for step motor controller