Bound buttons to CLI functions
Refactored the debugger and its related event handling as well.