Make compatible with python 3; use labels in some search results