Add some tests and checks