Refactored modules to allow having multiple lexers at the same time.