Add two way collapse for paths
Refactor preview collapse functions
Add two way collapse for models/definitions