refactoring & cleanup
added headlines, cleanup
code formatting for generated code
fixed relation grid
updated type hints, cleanup
added name attribute detection for relations