Add tests and intial debugger code