Re apply umd

Commit 1c60743f9df1a41f60436e8633fded2d3d92ab42 incorrectly resolved conflicts in `master`, so I reverted it and re-applied the original commit.