More blockchain refactoring