The original code also used "magic numbers", but more crudely.  Flats got one magic number, sharps got another.  Results were undetected conflicts in some cases, false positives that wasted space unnecessarily in others.  My results are better.  But I just checked with Bravura, and there are indeed a couple places where my magic numbers are off - never in a way that results in undetected conflict, but in ways that waste space in some situations.  I will look at this.