diff --git a/libraries/AP_OpticalFlow/AP_OpticalFlow.cpp b/libraries/AP_OpticalFlow/AP_OpticalFlow.cpp
index d2f6daa46825fb84af0fb131b4ee58574a070cca..00fb2eca2c07976372dbb15594876df00610bbc5 100644
--- a/libraries/AP_OpticalFlow/AP_OpticalFlow.cpp
+++ b/libraries/AP_OpticalFlow/AP_OpticalFlow.cpp
@@ -108,31 +108,4 @@ AP_OpticalFlow::update_position(float roll, float pitch, float cos_yaw_x, float
 	_last_altitude = altitude;
 	_last_roll = roll;
 	_last_pitch = pitch;
-}
-
-
-/*
-{
-	// only update position if surface quality is good and angle is not over 45 degrees
-	if( surface_quality >= 10 && fabs(_dcm->roll) <= FORTYFIVE_DEGREES && fabs(_dcm->pitch) <= FORTYFIVE_DEGREES ) {
-		altitude = max(altitude, 0);
-		Vector3f omega = _dcm->get_gyro();
-
-		// calculate expected x,y diff due to roll and pitch change
-		float exp_change_x =  omega.x * radians_to_pixels;
-		float exp_change_y = -omega.y * radians_to_pixels;
-
-		// real estimated raw change from mouse
-		float change_x = dx - exp_change_x;
-		float change_y = dy - exp_change_y;
-
-		// convert raw change to horizontal movement in cm
-		float x_cm = -change_x * altitude * conv_factor;	// perhaps this altitude should actually be the distance to the ground?	i.e. if we are very rolled over it should be longer?
-		float y_cm = -change_y * altitude * conv_factor;	// for example if you are leaned over at 45 deg the ground will appear farther away and motion from opt flow sensor will be less
-
-		vlon =  (float)x_cm * sin_yaw_y - (float)y_cm * cos_yaw_x;
-		vlat =  (float)y_cm * sin_yaw_y - (float)x_cm * cos_yaw_x;
-	}
-}
-
-*/
+}
\ No newline at end of file
diff --git a/libraries/AP_OpticalFlow/AP_OpticalFlow.h b/libraries/AP_OpticalFlow/AP_OpticalFlow.h
index 0e36a6c5b38a031f94a1326a068fc2c83542dca7..968de9cd49d020720cd1a4b47330d0ee955a00aa 100644
--- a/libraries/AP_OpticalFlow/AP_OpticalFlow.h
+++ b/libraries/AP_OpticalFlow/AP_OpticalFlow.h
@@ -17,8 +17,8 @@
 		write_register() : writes a value to one of the sensor's register (will be sensor specific)
 */
 
+#include <FastSerial.h>
 #include <AP_Math.h>
-#include <AP_DCM.h>
 #include <AP_Common.h>
 
 // standard rotation matrices