Refactor generate_blocks

Refactor generate_block,,generate _generate_tower_block and some
indentation