refactored pollution system into different components