Fixed the build system and some compilation errors