Improved the Template engine so it can load ViewElements