Add a bunch of fixes and changes, cleaning things up