Merged dromoi.c and dromoi.sml from testing branch