Fix Misspellings and Refactor Test