refactored error module and took out passing state around. dunno wtf i was thinking, just pass the damn token variable around instead.
update the debugger to accept token object format.