attempting stave detection
line reduce and join now working.
stave detection should be working now
merged staveDetection branch into master, fixed merge and compile errors