Minor refactoring of MatchingEngine class
Modify MasterTemplate to generate MatchingEngine