upgraded pagination not to use tpl class, also updated comments in some classes