the whole class is a little weird... perhaps stop holding classes inside structs? this needs better tests before refactoring confidently