Refctored Template classes and updated html fragments