Texas spending millions to upgrade aging infrastructure