consolidated ball.js and ballManager.js into a single file