Improve pagination styling (PHPBB3-12613)
Fix minor optimization issues
Remove legacy code