Implemented template html generation