Fix $scope usage
Improve pager
Add template support