Reduce code duplication by excluding prompt functions