Balls collision works, seemingly correctly
Code separated to js file with optional settings overriding