updating IDEA ignore files
refactoring code, making simpler. Removing unneeded if() block, adding comments, removed header
Adding README file