Fixed up issues with PAK files and refractoring