Refactored Explosion code