Edits to avoid using deprecated methods that generated warning messages