r268: Tidied up the dnd code a bit. Fixed a bug which prevented data from being