refactor module cleanup: one-time code can go in __del__; close() is for flushing data

also, Node requires a name, which it uses to create an object-specific logger