Moved db class to db package