Simplified version of !699 (closed), focusing on only visible parts, not internal variables and folders, etc.
Review here