Improved algorithms for joint optimization of facility locations and network connections