merging from dev

Dev isn't complete but the master repo is fubar.