refactor, bit neater
defaults.json is now .js so we can be more flexible