Finished initial version of CollapseStructure_Agent