Moved pack setup code.