Removed unnecessary passing of variables