Ban implementation
Introduce helpers.c to reduce duplication