Fix indenting
Only re-insert if needed
Merge pull request #2 from LaDress/improve-performance

Improve performance