Small refactos to get angular handling the page transitions