Here we extracted the common methods used in pages into utils and included them, getting rid of a lot of duplicate code in the process.