mentions autocomplete: some code comments and reorder