Improved OO-style in HTML template test