@jcheng5 I think this PR is pretty much done now. Here is a decision left: how to render such error messages? `alert()` is just a placeholder here (I know it is annoying and inappropriate).