Improve value decomposition

Also fixed JSDuck comments