Big refactor of page configuration loading