Add clearAll function
Rename conflicting variable names