Currently the main.go file is a complete cluster of config loading code. We should figure out how to refactor / optimize this.