Cleaner parsing

did some manual parsing for scan() and getinfo() so as to return much
cleaner data.