Some code orgainzation and added display score capability