Lots of final bug fixes and design changes