Use attributes for package names

This is #107 rebased on top of the latest `master`.