significant cleanup to the reflection code for reading the struct