Added unittest for trajectory. Changed trajectory implementation so that the particle type is saved as well from activeParticles.