Cleaned up database classes.