some tweaks to optimize dart2js output