Working beta version - eliminated strange round move around two balls by taking smaller precision and checking if balls distance isn't too small. Attached first release version.