Slight modifications to scoring code