Server events refactoring