MQL parser refactored