remove js debugging, and refactor config_key ternary