Refactor backend markup for extended statistics.

References #54