clean & refactor (node-only)