Updates to code while working with SamR