Js mass balance

Just for revision and discussion about proposal of new Balance class.
Consider balance_ as shared_ptr.