Hacked version of @bsimpson's remove_delayed_selection branch

Closes #179