Refactored blockService.h