Cleanup, remove more global var.
Switch to granules_per_frame