added support for registering node creation listeners and other minor modifications.