Changes to navGrid. Navigation now closes if the background is clicked. Some refactoring too.