Fixing sequence of operations so that the fewest number of commands are required to create a working build