Refine JavaScript dependencies