first commit after MHacks. Lots of fixes to make