clean up of recurse and fix to handling arrays that are not proplists