Continue refactoring of Generate Structures.py

Refactored block generation into a function and change variable names.