Add more tests and fix broken ones