Cosmetic changes
Moved buffer counter to reset on each run