first try at cleaning up custom assertions.

 changed `asserttemplateused` and `assertcontains` functions