Added a ball class and a server class. Fixed some problems in the code.