improve tests, better erros, fixes

cosmit