really clean up the urls and functions to be dry