Updated tests + fixes