Added gitignore file and some code-refactoring (formatting)