Improved the config file handling.
Minor changes to logging and IRC connection.