Reimplements score with SQL
resolves #346
more score fixes
more scores cleanup
fix #329