backport classes cleanup and speedup
Merge pull request #4673 from civanch/particle_charge_71

Backport classes cleanup and speedup