Continue refactoring of Generate Structures.py