rename corpus creation tests
serialise context before inserting into db
catch sql exceptions more carefully