More settings refactoring, and updates to support that. Changed pagination() to require a layout param.