Renamed x_ to just x and code cleanup.