Adding optimisations to build script