Refactored meta-programming tools (tested)