navigation completely rewritten using angular ui
fixed error processing and removed exessive code