Implemented activate function and fixed updates.

The updates were replacing the entire document with just 'deleted' or just 'active', so I added the $set command to update the single value but keep the remaining document the same.