Remove remaining gc.collect() in this file :-)
Cleanup, and some simplifications