cleaned up database.rb to use the settings instead!