Hotfixes after refactoring
Several updates and Bugfixes:
- Changed getEntity() to getDocument()
- refactored handling for subtable results when fetching items
- fixed indentation of code
- fixed spelling errors and incorrect function calls.
Several updates and Bugfixes: