chrome code cleanup and re-written to ...

chrome code cleanup and re-written to properly handle JSON data