Implement title of results, refactor code