Removed some array_merge that wasn't working and might be unnecessary.