js evaluation, cleanup, error reporting