move key name to config.js, clean-up some syntax