Minor tweak to simplify some code.
Refactored to abstract the rendering engine so it can easily be swapped out. There are quite a few changes that I forgot to commit months ago.