Use factory to resolve adapter types and other improvements to POCO support for ATS