refactor watchpoint.lua and implement correct 'untrap'