Move namespaces to namespaces.h and add missing files to Xcode project.