Refactoring to improve maint.
Changes for a saner configuration.
Adding config file.
Changes to use config.