Lots of bug fixes and minor updates to make sure it worked