Added check for conf file in xchatdir.
Refactored a bit as well as worked on some new functionality for receiving messages.