Js reactions

Try to merge changes that fix computation of ractions