Removed log statements.
Added a function to strip javascript tags.
The result was sent as an array but it should be sent as a string.