fix some core classes and add pager tpl