refactor and add jasmine spec for metronome model