See the comment on the main page of this pull request. I want to make sure the front-end code is consistent with what you have changed in this diff.