ref: move stub configuration code