rewritten the way to load new views; made a single loadView function so one can easily execute code before new views load
Merge branch 'fix-refactor-loadView' into dev