Forward ports of older open PRs to cuttlefish

This applies the intent of the following PRs in a post-cuttlefish world:

* #338 
* #361 

Thanks.