Fixing timing issues, bugs with gravity and the updating of particles