Js reactions

Try to merge changes that fix computation of ractions
Description makes little sense for a user.