Restructuring for #665 and #681
Resolved a seg fault and removed dead attributes
Authored by: numere 2022-04-26
Parent: [r1127]
Child: [r1129]