preliminary split parseing out of parse class so that it can be used in various places.