refactor - made the application a lot easier to extend using different
settings.