- Removed obsolete TAG variables
- Changed variable from global to local