It would be much better to have a single function for each layer that initializes ggtags, helm-gtags and counsel-gtags for a mode.