Set initial balls from the URL, code clean-up