Tweaks to samdy to clean up comments and a little bit of code