some cleanup of array and model