Added basic unpack code