Optimizations to build script
PHPCS fixes