Improve efficiency, modularity of tempo recognition