global cleanup, added comments