refactored utils, decomposed template functions and non-template functions
ongoing work to compute nearest hyperplane parameters