Big refactoring. Also explosions became faster.