WIP: work on hierarchical visibility and scripts