Renamed some classes. Added clearing resource pools.