Legal aid bill heads for Royal Assent