Updated dropdown script to allow nesting