Disconnect the negative cable from the battery and drain the cooling system. Remove the throttle body, fuel injectors, and fuel rail. Label and detach all wire harnesses, control cables, and hoses still connected to the intake manifold, ensuring the various hoses are marked for correct reinstallation, and press in on the clips to release the wiring harness retainers. If working on a 3S-FE or 5S-FE engine, carefully lift the wire harness over the manifold. Unbolt any braces still in place, then remove the mounting nuts/bolts to detach the manifold from the engine. Use a scraper to remove all traces of old gasket material and sealant from the manifold and cylinder head, being careful not to gouge the aluminum manifold, and clean the mating surfaces with lacquer thinner or acetone. If the gasket was leaking, have the manifold checked for warpage at an automotive machine shop and resurfaced if necessary. Install a new gasket, position the manifold on the head, and install the nuts/bolts, tightening them in three or four equal steps to the specified torque, working from the center outwards to avoid warping. Install the remaining parts in the reverse order of removal, check the throttle linkage for smooth operation before starting the engine, run the engine to check for coolant and vacuum leaks, and conduct a road test to ensure proper operation of all accessories, including the cruise control system.