Multiapi convivence support by prototype pattern

Multiapi convivence support by prototype pattern. Refactor on
configuration structure.