Deleting code of calculating score based on complex if-clauses