Whitespace & style fixes
Fix back-button after you saved a new document

When you were creating a new document and then clicking save
the back button would bring you to the editor for new documents.
To get back to the Documentslist you were coming from, you had
to hit the "back"-button twice.

Additionally renamed lastPage to lastPages as it contains
multiple pages.