refactored to clean up server code.  Added  to events that create or remove items.