Sanitized function names.
Made JSON parsing more safe by adding checked exceptions.
Insert now returns the objectID of the inserted document.
Updating and removing now returns the amount of affected documents.