Fixed Comile Bugs

Forgot to use CV name space
Fixed More Bugs

Had to pass by reference