Don't require argument to database flags
Separate database connection from inserting data