ce: clean up attached callbacks and setup node bindings in the right order