Complete composite pattern implementation