Bugfix 1

Various bug fixes, mainly motor ports.