Various updates to code and README

Using queryformat to make parsing more reliable. Also added more info to
README.