improve CodeCleanup fcn, add snippit