Update for Dart 1.0
Wow, I used to write pretty awful code back then.