Changed directory structure, fixed warnings, updated to use namespaces