Database initialization improved, some issues are still present.