refactor validating and fetching config out of CLI into new objects

Signed-off-by: Eric Tsiliacos <etsiliacos@pivotal.io>