Refactor lockdown to common utils