Refactor routes and add support for deleting documents

Closes #22