changing the self running functions and linking them to scope
removing the route reloads