code documentation & slight cleanup
fixed null entry in node
handling selected datatable bug