Moved build logic into script.