Moved db_ems to global