clean up formatting of endpoints