Adding paging and refactoring stream controller WIP;