Lots of bug fixes and the such