Sourced out file operations to library functions and changed layout of .repolist file