not tested, don't know if compiles ever.
+ basic server
+ basic memory management
+ some code cleanup for the sake of sanity