Reworked and updated build scripts.