Cleanup

Did some mess merging from the dead branch