Make a few fixes and start cleaning old cruft