abstract the loading of html to a new class