Move some logic into parser factory.