Sorted out the linear algebra. Was all transfukedup