Rewriting build procedures to make them more atomic