Added a colon to the last statment sent of D command. Created a daq struct and reimplemented main program. Moved R cmds to function in implementation file.