Implemented PAPI counters into code. Seems to work well!