Refactor containers to fix cyclic import