Add flatten option, and allow passing a single glog as an option