refactoring the directory
Add the db prototype
refactory the file