Added some tests and debug backend