The fan is definitely tricky. I found it's best to slide it out partially by pulling the bottom of the fan toward the rear of the bike. Then, rotate the fan clockwise. It just barely clears the master cylinder.
I've had to pull the O2 a few times in the last month. It gets easier after the first time.