WIP collapse test and loadtest code