Improving style and code of pagination module.
Some minor fixes in many parts of framework