Reworked build scripts