refactored structures to simplify their implementations