Fixed errors + adjusted to new changes in spark.dart

@gaurave