Added auto-cleaning behavior. So far looks good. Also fixed another node id bug.