Updated docs and build files, also fixed a few bugs