Code Refactor. Move some magic number to config.js.