The purpose of this act is to:
(1)  Give constitutionally required deference to the decisions of fit parents in custody actions brought by third parties;
(2)  Subject to such constitutionally required deference, meet the needs of children for caring and stable homes by providing a flexible method by which a third party who has cared for and supported a child may obtain legal and physical custody of the child where such custody is in the child’s best interests.