Jeff's changes for #122 and #145