HTML escape added + refactoring