Extract banner generation to a separate function