Load scripts only when needed