Refactor generator script
Refactor generator script

Move struct generating to separate function and restructure the file to
comply with PEP8 (except for the line length limit).

brokenpylons/MyoLinux,brokenpylons/MyoLinux