The layered approach which was found to be the most successful in maintaining correctness in the face of rapid change of scientific programs is described. The approach revolves around a defense in depth layers which include protocol for source control, language-specific safety tools, design by contract (DBC), verification, reusing reliable components, release management, bug tracking, and different testing procedures. Errors in modeling, algorithms, and implementation can be hard to distinguish, making correctness of the implementation crucial. The different testing procedures followed in the layered approach are automating testing, unit testing, integration-to-main testing, and regression testing.