Rearrange imports in home.py so they apply to new discussed format (separate "from ..." and "import ..." blocks). Add Delete Document functionality.
Patch by: Pawel Solyga
Review by: to-be-reviewed
Bugfixes to the latest revision
Some pages did not work due to missing imports, or wrongly
imported modules.
Patch by: Chen Lunpeng
Reviewd by: Sverre Rabbelier