Huge refactorisation of code!
bug fixed in pregamestate