Various cleanup fixes
Refactored the use of providers for entities