Hiding ParserImpl behind a trait and a factory method