Refactor gulp tasks to fix watch bugs