javascriptsessioninjector refactoring