Refactored to meet java coding style. Moved documentation to README.md.