Cleaned up ball code.