Section 5338 merely restates the basic premise of custody law: the "best interests" of a child are always paramount. Under Section 5338, a custody order may be modified to serve "the best interest of the child". This continues the existing standard in all custody cases.
Section 5339 permits a court to award reasonable counsel fees, costs or expenses to a party if the court finds that the other party was acting maliciously, wastefully or otherwise in bad faith. Section 5339 also continues existing law. However, it does include the possibility of awarding counsel fees merely for "repetitive" actions, which may be an advance in this area.
Unfortunately, I find that many courts are overly reluctant to award counsel fees - even when a party has acted badly. This is a common complaint among top practitioners in the field.
Even when awarded, counsel fees almost never fully reimburse the injured party. However, by carefully documenting repeated bad behaviors, reasonable counsel fees can sometimes be obtained by good counsel.