Beat logic and synchronization fully functional. Minor structure changes for cleanliness.