fixed some bugs (not finding nested samples), added file input to tests and replaced
dumb hashtable by a generic avl tree