Added gitignore, reformatted some codes