Rewriting scale(note, scale_name) in a more beautiful way

Removed duplicated code
Extracted data structure to make it easier to reuse if required
Fixed trailing whitespaces