Changed the directory structure, modified some build scripts