More tests for sum-of-squares score; integrated it into the analysis code