added and modified some comments. Fixed problem with query test and API passcodes.