I see there are some duplicated code around calculating the frontend url for a change.
I think it would be better to introduce a getFrontEndUrlFor(event) in the Config object instead and a lot of the code in this file and above could be removed.