The happy switch is the only thing that really difers between an AR15 and an M4/M16 type rifle.
AR-15s were available with Happy Switches. The Air Force got a bunch of them before the rifles were given the official designation of "M-16". I shot a couple of them during my time in service. I shot them only during training and qualification and never in full auto.
The original design uses a direct impingement gas system while some newer designs feature a separate movable gas piston to act-15suate the action.
The original design uses a piston located in the carrier. The original design is NOT a direct impingement gas system, a fact Eugene Stoner points out in his patent. Colt describes the system as direct gas.
"AR-15" covers a lot of territory. It's been used by Colt, as well as many others, to describe the whole family of weapons in a variety of configurations, from full length rifles to short barreled pistols and SBRS. "M4" describes a specific configuration of AR that Colt developed and sold to the military (Colt had recently lost the M16 contract to FN and needed something to get back in the game). Confusing? Not as confusing as trying to make sense of cartridge designations!
Back in the day, a technical article said the barrel length of the M4 was developed by reducing barrel length while keeping the front sight block at a location that would still allow the mounting of a bayonet while maintaining reliable function, then adding a half inch for insurance. The shortest length to meet that criteria was 14 inches. It became 14.5 inches with the added half inch.
To make the civilian M4 clones legal, the barrel was lengthened to 16 inches. The increased barrel length made it impossible to mount a bayonet, which critics of the time made a big deal of. I don't think any of the manufacturers (except maybe Colt) put much thought into refining the gas port size to compensate for the extra blow down time. The result was a bunch of over gassed carbine gas system civilian M4 clones.
Armalite chose to address the problem by developing the 16 inch middy. They did so to create a softer recoiling carbine. At the time, the marketing hype was that the new middy would allow the user to mount a bayonet to a 16 inch AR! That's how much influence the bayonet still exerted at the time.
The AR FOW has greatly matured in it's time, even more so in the last 5 years. Smart makers have a better understanding of how gas port size affects the operation of the AR and now offer rifles in all barrel lengths that shoot smoother and more reliably than ever, in all barrel lengths down to the shortest pistol/SBR, suppressed or unsuppressed. There are makers still stuck in the Dark Ages with their over-gassed systems but others have seen the light and moved forward