You just re-heat the headlamps and push them back together. I'd recommend clamping them with spring clamps to hold them together while the sealant cools down. If you're missing some chunks of sealant you have 3 options; Silicone, Nissan Butyl Rubber & Honda Bond. As for the rear some people use silicone, some people use JB Weld and some people make custom rubber boots to cover it. I would try and find a spot within the headlamp to keep those silica gel packs, they will help prevent the lens from fogging and of course get rid of any moisture that may make it's way in. Most people just hot glue them down or double sided sticky tape.