Updates suggested by @khelm and @nicholst