Remove the dependence on Eigen