Added file loading and fixed up pager logic