Moving parsing to parser class