Preparing to start returning error node IDs. Also some cleanup.