Moved RulesHandling's code into Parser