fixed encoding, cleaned up build.script