"standalone" functionality for garbagecollection

first argument can be studypath or empty if studypath is pwd