Optimizations and switch to caf media