Replaced nav link with real route and replaced some instance vars with local vars