fixed 31-TET implementating, general clean-up