fixed scoring bug
Refactored some variable names