Merge pull request #51 from murrekatt/main_cleanup

Even more main cleanup
Moved out message processing code into own class.
Moved out init for socket to MessageProcessor class.