Adjust namespaces and fix build script.