Rework of structure and add auto-provision option