Refactored the configuration layer, and expose a 'configure' command

btw, the fact that tests are passing on 5.3 shows that the CLI part is untested