Restore calculate_cm.py
Remove staves.py
Update stave lengths for different uses and fix algorithm