CR fix js files, add error callbacks and naming fixes