Refactoring server events

Refactoring server events to allow having client-side events in
conjunction with events sent to the server