Fixed bug with multiple action types repeating, and with tasks becoming dissociated after device edits.  Added final version of arduino code.