Improved MQ parser