Modified codebase to take into account namespacing. Not fully functional.