Revert "v0.4.0 merge"

This reverts commit 62b20eacfdb5bd7d792ad07e4a21e541beda75b5, reversing
changes made to 657939b3de67794922284b06e36a9dfe348112e6.