Complete server a bit
Fix forgotten return
Avoid double free
minor fixes