Fixes #44 and organized java files