First set of fixes for Dart 1.0 compatibility