Got things writing to the database