Refactor sequence.js to use lodash difference method