Restructured the common/ directory, and simplified the build process