Minor refinements, such as changing the scope of the unpack function.