Simplify each block to remove unused variable