Changes to arrays and maps: added $valid and $init