Fixes dependencies
Minor refactoring on java config