Improved "mode" infrastructure, including support for page modes