Flying debris smashed through a window and Hurricane Andrew's screaming winds pushed inside the home, splintering walls and tearing off the roof. Parents and children huddled under a mattress in a bathtub or closet as jagged pieces of wood and metal whirled around them. That scenario emerged Aug. 24, 1992, when Category 5 Andrew damaged or destroyed more than 125,000 homes and left about 250,000 people homeless in south Miami-Dade County. The destruction was born from a mix of 165-mph winds and outdated building codes, shoddy construction and poor inspection practices in Miami-Dade - which had the state's strongest hurricane wind codes at the time.

Fifteen years later, Andrew's legacy takes the form of a state building code that was tested during the 2004 and 2005 hurricanes and is still being adjusted and researched today. The code's purpose is to protect lives, to help reduce property losses in a storm and to provide a guide for insurance companies to determine rates.

"There's no question that more homes withstood the impact, and therefore more property was salvaged and lives probably were saved as a result of the better building standards (established after Andrew)," said Jon Peck, spokesman for the state Department of Community Affairs. "Hurricane Andrew taught us a lot about what you should do and what you should not do."

Homebuilders, contractors and insurers, along with state and local governments, responded after Andrew caused about $16 billion in insured damage. The storm exposed inadequate code standards that were based on old data or flagrant violations that slipped inspection.

In some cases, there were not enough nails affixing plywood sheets to roof trusses, or the nails used weren't strong enough. In others, unprotected windows and doors were too weak to withstand flying debris. Many of the damaged or destroyed roofs were not braced or strapped down properly, and roof shingles and tiles were not properly installed.

The damage caught the attention of building officials across a state with no single uniform code, and they began investigating their own standards. Some changes came immediately in South Florida, such as the banning of certain types of wooden roofing materials, said Tim Reinhold, a vice president of the Tampa-based Institute for Business and Home Safety. The organization was created by the insurance industry to promote hazard resistant construction, maintenance and preparation practices.

In 1995, officials decided to apply the high-wind standards of the Standard Building Code, which was widely used in the Southeast, to all of Florida, Reinhold said.

Then, in the late 1990s, three building codes being used as models nationally merged to form the International Building Code, Reinhold said.

In 2004, the state adopted the International Building Code as a model, adding some Florida-specific aspects, Reinhold said. New homes are built according to the code, and breaks on insurance rates await homeowners who retrofit their homes to comply with current standards. Meanwhile, homebuilders such as Charlie Johnson Builder and Mercedes Homes offer homes with hurricane-resistant features such as better roofing materials, concrete walls and out-swinging doors.

Included in the code is a wind-borne debris region, which requires certain homes to have door and window protections up to 120 mph. The Panhandle had been exempt from that provision, but a bill awaiting Gov. Charlie Crist's signature eliminates the exemption and makes a uniform state building code.

The code also established new standards for roofing, created more thorough inspection processes and required that products used in home construction meet approved hurricane standards.

These changes began to be applied in homes built after 1994 and were tested in hurricanes Charley, Ivan, Frances and Jeanne, all of which affected Florida in 2004.

In 2005, University of Florida researchers studied the differences in damage between older and newer homes, comparing 200 randomly selected homes that were in the path of the highest wind zones generated by the hurricanes.

The study concluded that homes built under the 2002 Florida Building Code sustained less damage on average than homes built between 1994 and 2001 under the Standard Building Code. Homes built before 1994 also fared worse than those built after that year.