Modified database.rb models