More modular bitmap usage.
Fix bugs in changes in resource grants.