Slight bug fix in allocate_block and free_block.

Implemented add_block.