Mostly finished adjusting namespaces and headerguards, problem exists with sync (which should not be implemented the way it is regardless)