Refactoring Database Insert Method