mostly changes to the system for registering and enabling packages, plus some minor fixes