Added Smarty, fleshed out basic code.