Trim trailing white spaces
Added use strict
Added missing semicolons
Fixed 'jsonresponse' used out of scope