Handle compile warnings and add .gitignore

I set up the project in eclipse and fixed various compile warnings. I also added .gitignore to ignore .classpath etc.