Adding ImpermanentDB + refactoring
Adding ImpermanentDB + refactoring