Refactored Block.cpp