Major Overhaul to the UI Foundation
Now using templates for everything
Restored all previous functionality but with templates now