Update 2

Various fixes... still not fully tested