More bug fixes

Corrected returned values of speed factor and extrusion factor
When setting the machine name and password, stop at the first control
character, and remove trailing spaces