Fixing Build errors and motor function prototypes