Fix some warnings
Made clients shutdown when their TCP connection closes

Closes #26