Minor fixes trying to get dart2js to work.  My "fix" on one of the first commits actually broke it, dumb mistake.