Major rearrange of the documentation. - rebased

Major rearrange of the documentation. - rebased, replaces #574