Added score function and fixed semi-colons