Added Smarty Template functionality and implemented some 404 Functionality.