Add flow options (mapper_flush, mapper_opts, reducer_flush, reducer_opts) + Code cleanup