Update structure.py
Update structure.py

Removed the need to define a new function to find the highest common factor and just used the reduce function from functools module and the gcd function from the math module.
Structure of the code is consistent.
WMD-group/SMACT