consolidated and formatted constants, added tests for new code, refactored variable name for play_freq to make more intuitive sense