Packages and localization

Sean, please consider incorporating all (or some) commits into master branch.