incorrectly reverted back to old SWAPRsqlite, changed functionality of finalize to match the new table structure