More work porting the Spark framework