Switch to enable async factory functions returning promises