reformat some of the code for printing. add .idea to gitignore