small updates to refactor some code and make things more readable. Also, included .idea into the .gitignore as it was not previously included