Initialize some arrays to avoid php issues and also use list() here to avoid double array dereference