Refactor particle-system.js
Small random.js beautification.