Move Settings from viewer.js to its own file