Variable names

Fixed variable names, changed some comments, removed the duplicate
"replaceWord" issue