Merge from Yandan/Yu Miao for the dbinterface and after-decode logic things.