Changes from upstream repository and possibility to specify custom user segments.