refactored setup parser to pull out parsing into classes