Add title variable and display function, refactor tests