Refactored BlockRepository