Added distance joint for internal actors. Refactoring