shortened beat repeat hold time, took care of some memory leaks, removed int64 from sample counting loop