remove call for optimization, improve loops
reverse splice of registerRule