refactoring: delete old var in template and js code