improve autocomplete and add directive nav active tab