Make updating navbar opts a function