Lots of fixes and updates. Mostly works.