Code updated to match course source code

 - added comments
 - fixed untracked files (.gitignore)