Fixes to navigation and tidying up CS -> JS