Some proof-of-stake checkings refactoring