Cleaned up unused code
Don't reset the counter on every .