refactor programme editor