Issue #44: Re-did threading to use threading module instead of thread, added clean close command to client