lots of cleanup, and work in installd (like app sync)