DIRTY HACKS EVERYWHERE

Got everything working again with the namespacing, but a lot of this needs to be looked over and cleaned up.