Refactored to Metaquotes like code