Working building tools, added source files

Added script files, other files and refined build tools.