optimizations
refactored dir layout, added java tests