Moved some static methods to HTML template.