cleaned up some of the code, added in homing and indexing.  The homing
feature may not work quite yet.  This feature still needs to be tested
on the actual arm.