Refactor to add per page asset loading