Remove unused variables
Manual merge of latest version changes