Implement scoring

This is ready to merge. Everything should be working!