Converted parser from a module to a regular class