Fixing stuff
Lots of revisions to get to a working state