changed active_page_name to tab_id.
changed primitive_insert to create tab object.