Moved the api/json handling for Documents to an api namespace; Implemented  for the DocumentFactory and refactored; Got adding of documents in the front end working