polish code of tpaginator.cpp, tpaginator.h