Converted parser into a class so that individual parsing methods can be overridden