refactored array & tree component definitions