Optimize frontend.