Fixed more bugs where relative chords did not always evaluate to the proper octave
refactored code for the bug fixes for relative chord octaves