Adding support to format js when creating a new session