Code written to load corresponding pages only when required