Minor fixups (provides, cleaner usage of flags, assert)