Code and tests working
Fixed misspelling
Small whitespace changes.