fixed bugs in particle swarm, and finished finalizing testing framework