Added gheto algebra wrapper around hmatrix and modified LogisticRegression to use it
More refactoring of optimizations