Added tag searching and generalized many functions