Removed unnecessary code from pc.c, linked list of heartbeats is freed outside of loop to avoid unnecessary checks within the loop which slow down the code.