Refactoring
Database insertion