This controller does a lot of things!  You may want to write a helper method that takes a collection of tags and makes the tokens? I don't know what a token is though, to be perfectly honest. Is it just a tag? Naming is hard :(.