added nav
added view/edit buttons and refactored