With no navigation content several `div` layers are incorrectly closed.

Also merged adjacent `if (navigation)` statements.

-- With no navigation modules an excess of space appears at the top of the page due to too many div tags being closed.