replaced arrays with objects in export_code() functions