Update transcript output function to flush after each output
Return a proper CDB database structure to Scheme
Refactor test cases