Remove dependency on nalgebra