add ParticleFactory to Environment

- make ParticleFactory getInstance private
- use Environment<> to get instance of ParticleFactory
- sove all dependencies
- fix all example compile time errors