Do less unnecessary work!

Also less nesting!
All this DOM building is expensive.