Tests working bar matrix linmod test, still need to tidy everything up, streamlineee