Move geometry unpacking logic into separate package.