Lol, I couldn't think of a good function name, and added that as a temporary solution. Guess i forgot to update it.

So it sets the active state and generates the URL. setActiveStateAndGenerateUrl? Any ideas?