Changing the implementation to classes
Fixed template usage
Escaped characters for html