Refactor ambient.js
Add config.js