The collapsible code from (the giant Ategon branch) but generalized into here
The collapsible code from (the giant Ategon branch) but generalized into here