Streamline java code
Merge pull request #7 from dissan/patch-1

Streamline java code