Fix bad placement of rstrip; tidy how defaults are used