Composite adapter

Do not merge yet. Still missing some tests and documentation.