Porting code to be compatible with Java 1.6
Incorporating formatting feedback.
Merge pull request #42 from nutsiepully/android_port

Porting code to be compatible with Java 1.6