Added support for configuring log via the config file.
Cleaned up code and added support for configuring logging via the config file.
Removed unused methods.