Buildscript

Added build script for great good
And a few minor fixes along the way