Move method to dump into html into separate file