Tidy code and add .gitignore for Eclipse