Made the title method a lot smarter