more doc - fixed reference doc and updated a few comments in scan.py
removed old code