Refactored because of DartLang changes over the last year...