More qsim fixes.
remove debug prints.
Compress traces in the database.