Fix #394.  Code cleanup.