Refactored code. Setup eclipse project files.
Formatting and refactoring