feature/fix-hchord-bassname

This PR is primarily about fixing an issue with the *&X* template placeholder not being replaced with the name of the bass note when the key=none. The bass note name was being set to the empty string right before the substitution happened in the `hFindChord()` function.

In addition to the above change, this PR also includes some refactoring of the coding to fix style issues (i.e. variable declarations, bracing, etc) and add some additional type checking for safety.

@jazahn can you look at this?