Updates to compilation algorithm.