Refractor code and update gitignore

gitignore now excludes .classpath and .project,
which were getting annoying.