Update xodusamp.ino

Moved a few routines into their own functions and updated comments