Refactor into ball class.