Adds onHitEffects and refactors some old code.