Add basic build scripts
Fix some build errors from merge