Refactor server to handle multiple connections with a single watcher