Janis–Newman algorithm: simplifications and gauge field transformation