Refactor db config into config.rb
Validate to prevent saving palette twice