Moved code to navigation page