Reduce number of layers
Move rebuild instructions into script