Issue #1404 Unneeded variables and method calls were removed.