Tweaks and add Safari support for flex