Removed unused imports.
Added .gitignore.

Ignores Eclipse's stuff for now.
Added serial UID to remove warning.
Added a bit of doc.
Added a couple of constants for clarity.
Removed static methods. No need.
Made method static for clarity (there was no state).
Extracted part of method into method for clarity.
Added doc and changed method name for clarity.
Removed class name for interface.
Extracted part of method into a new method for clarity.