Updated to allow the changing of a key => string_val to key=> array(key => string_val) and visa versa.