lots of changes. turn GLM into a factory method. write a utils class.
two classes to handle skinny and fat matrices separately