Moved code into packs.
Minor changes.