1. bug fixed in tensor class
2. added a few functions to densematrix class
3. normal matrix method for least square, does not work well
4. misc changes in utility