Complex optimized and export functionality added.