added unit tests
End of refactoring, particles improvement