Fix name to return the title, not the actual text

Changes the name to return the title, not the text
PEP-8 fixes
Change the edit to a better name