Refactoring to make reoloading pages work
Allowing refresh