Add getscore() and some test to avoid exceptions.