Add to gitignore and improve proficiency exercise example code

Add .idea to the ignore file. This is the settings file that IDE made by JetBrains use.

Also made some minor improvements to the proficiency exercise example code.