adding some ri doc commands, other tidy ups