Add some tests and remove debugs