Refoctored commandactions to return errors, and wrapped in closure. More updateremote command stuff