Added some scorring code (need more work) + some cleanup