Refactor stub implementations into common dummy functions