Code cleanup.
Optimized object manager handling in Template/Provider.pm.