added auto nav creation and more optimisations