Unpack logic refactored out into ResourceUnpacker