Rework generating of files so that every generation tool will only run once.