Make it return a hash for page numbers and shortcuts. Move logic handling for the shortcuts from the templates to the helper. Make the pager length configurable. Add a helper for producing the shortcuts' links.