Refactor, add also method for adding documents from outside sources