Extracted a default app factory into a new run module.