cleanup in ampel code