Added more tests + fixes