Optimize JS load order