Refactor gulp tasks