Reformatted the code for readability, added .gitignore