fixed some typos in audio stats; cleaned up code