Resolve the database connection issues
delete several unused stuff