Refactored block_manipulation pkg, fixed compile errors