Refactor config processing into process-config to make app simpler