Improved gulp tasks and refactored some js files.
Merge pull request #1 from ted123/dev

Improved gulp tasks and refactored some js files.