The cam bearings have removable caps on the M40 so it can be removed with the head in place.
The cam pulley doesn't have a positive locating pin on the M40, ideally you need the special cam setting tools.
The easy way to set the timing is this :
On the inlet side of the engine under the starter motor next to one of the gearbox mounting bolts there is a hole in the engine block (there may be a plastic plug in it), slide an 8mm drill or long 8mm bolt into this hole and turn the engine over by hand until the 8mm drill or bolt engages with the matching hole in the flywheel. This sets TDC.
Next with the cam pulley timing marks set use a set square or similar to ensure the side of the square section on the cam is at 90 degrees to the top of the head. Tighten the pulley bolt.
Don't forget to remove the drill/bolt fron the block/flywheel
Cheers,
Iain T