* Try to fix some memory leaks
* Server can be friendly terminated with ctrl-c again

Signed-off-by: Jiri Hnidek <jiri.hnidek@tul.cz>