Optimize the order of styles and scripts