Fixed typo with naming
Added some commenting in the code