Refactored gulp tasks

fixed bugs