refactor all the class reflection to allow for inner object