Added insertion / deletion of items. Moved much of the logic to client-side