Adds scoring framework and small changes

Adds a basic scoring framework, fixes some function names, and cleans
up the code a bit.