Start of code to sync to megatest.db