Added "use strict" to js.
Fixed problem with error reporting.
Fixed problem with post error callback.