Fixes and addition of pagging