watch: refactoring of server