Extract config loading

Preparing for additional cli flags with common processing needs