Refactor score method

Also added code to invoke the tests (not sure if this is needed...)

@jstenhouse for your review :smile: