Added model functions, added missing LAPACK., cleaned up test.
Added many methods and cleaned up others.