added documentation, cleaned out useless code in build scripts