cleanup database.R