Added .gitignore and cleaned code