adding the code for configuration
adding a whole bunch to support a heavily refactored codebase.