Updated JS

Finished logic for scoring