Refactored particle physics

Done to make it easier to tweak behaviour from the chrome javascript console