Added test for prepare results html and fixed bug with substitutions.