Initial commit of answer

Committing the changes
Added some comments to code
Revert "More typos"

This reverts commit 7f657dd22ac20d22698c53b23f0057e1a12c09b7.