Implemented more or less correct dragging of the balls