move all logic with adding and removing measures to Measure.js

Change-Id: I707b790fb7bfc636c8fa89d122ab04ffbcb2cc21