the camshafts need to be removed to remove the pulley, the timing casing stays in place - you only need to remove the valve cover and the cams.
set engine to TDC1, remove the chain tensioner and reset it then put it aside, remove the pulley from the "other" camshaft by undoing the bolt whilst counterholding the camshaft from the cast in hex.
once the little pulley is out - remove the cam, now undo the "VVT" equipped camshaft from its saddles complete with the pulley attached, the removal of the previous pulley allows the chain to have a lot of slack that allows the cam to be lifted up by hand and the chain removed from the teeth of the pulley - tie the timing chain to something so it does not fall into the casing cavity.
once outside - you can do whatever you want to the vvt actuator - it has 2 oiling ports one retard and one advance side which are tested with air pressure, you can undo and clean it if you wish. Most of the times the fault is the PWM solenoid that routes the oil to the correct hole.
If you see a lot of sludge in that engine very carefully check for any oil leaks, the oil leaks are air leaks into the crankcase which then interfere with PCV function (air is lighter than the oily mist the PCV and breather are supposed to suck) - ergo oil becomes sludge.