Massively improve ball bouncing behaviour with incredibly ugly code.

Debugging code also left in temporarily.
Remove debugging code from previous commit.