Updated code to match Flux 0.3.0