Separate HTML/Text generation into modules and test both.