Reject work

Here's the patchset for #895 and #957. There's some detailed git commit messages if you want more information.