             if (!runRamp) {
                 throttleval = 0;
             }
-            dmoc.setThrottle(throttleval * (int)12); //with throttle 0-80 this sets throttle to 0 - 960
+            motorcontroller->setThrottle(throttleval * (int)12); //with throttle 0-80 this sets throttle to 0 - 960
 	}
 	else {
-            dmoc.setThrottle(throttle.getThrottle());
+            motorcontroller->setThrottle(throttle.getThrottle());
 //            Serial.println(throttle.getThrottle());  //just for debugging
 		}
-		dmoc.handleTick();
+		motorcontroller->handleTick();
 	}
 }
 
 
 /*Single single character interpreter of commands over
 serial connection. There is a help menu (press H or h or ?)
+
+This function casts the motorcontroller object to DMOC which breaks the
+proper generic interface but is necessary for testing. 
+TODO: This all has to eventually go away.
 */
 void serialEvent() {
 	int incoming;
-	incoming = Serial.read();
+        DMOC* dmoc = (DMOC*)motorcontroller;
+        incoming = Serial.read();
 	if (incoming == -1) return;
 	switch (incoming) {
 	case 'h':

// Create CAN object with pins as defined
MCP2515 CAN(CS_PIN, RESET_PIN, INT_PIN);
POT_THROTTLE throttle(0, 1); //specify the ADC ports to use for throttle 255 = not used (valid only for second value)
DMOC dmoc(&CAN);

void printMenu();


	setupTimer(10000); //10ms / 10000us ticks / 100Hz
	Serial.println("100hz update frequency");

        motorcontroller = new DMOC(&CAN); //instantiate a DMOC645 device controller as our motor controller
        
        //This will not be hard coded soon. It should be a list of every hardware support module
	//compiled into the ROM
	Serial.println("Installed devices: DMOC645");

