new features and fixes, plus a simple search tool

added a simple search tool (search_SAMADhi.py) and introduced a number
of small fixes to the existing code. Should be ready for a first serious
test