Bug Fix and Code Cleanup

Fixed a bug in the scoring function that added an extra "empty" element
to the scoring array, which could cause the script to return the default
response under certain conditions