Optimized buildscript