I’m new to copper pipe plumbing. Need some guidance for the replacement of the main gate valve. If I cut out the pipe and replace with new valve and pipe, should I solder the threaded portion of the pipe where it meets the valve? Can I replace with a ball valve instead of a gate valve? I’m guessing it’s code otherwise there would be more ball valves installed. What is the white coating on the pipe? Why would there be PVC fittings near the base of the pipe?