Refactored elements to allow generating request html statically from outside class