Factor implementation of Package to .cpp.