Renamed dictionary
Added array validation
Added more validation logic