Move packfile parsing out of this module