You are not using this or modifying anything outside the compile function below, so might it be cleaner to move the declaration inside there and remove the arg to compile?