Port from VS Online, significant restructure and added support for paging and sorting