Move index markup to smarty. Likely broken