Add parseResponse function, reindent JS

(used http://www.dirtymarkup.com/ )