Refactor jQuery UI into jQuery plug-in. Improve pagenation support