Edit gulp tasks; fix function type checking in tests