Refactorthe score and make it global ...

Still full of bugs and crap ...