Revert pulls 1049 1067

Revert pull requests #1049 and #1067. Master is restored to a working state.

```
  1676 tests complete (2 minutes)
  111 tests pending
```