add Score class and corrected some compile errors