The freewheel is relatively unhurt by WD40. The brake parts are a completely different story, though. Don't get oil on the pads or rim.
i.usually clean the chain with one of those Park devices. All the black stuff gets removed. Then apply Tri-Flow on the chain after.