Initial (working) version of build script
Cleaned up build script, added comments