Merge "Allow factory functions for creating API modules."