Cleanup duplicated logic
Add scala version for dependencies