Add an optional handler to packages install so we can follow progress

While I'm here add missing imports.