Changes to particle functionality(error fixes & update function added)