Lots of changes

Fixes an issue with the notifications send from inside the model, does
some tidying, some refactoring and some cleanup. Also it fixes an issue
with the SocketServer injection (it was not bound as a singleton) and
adds debugger output for NLog.