Add support for distributed joins
Remove unused method, and fix intellij warning