Make peak tracking a generic module so that I can apply it to other modules...