Converted original code to conform to gulp plugin guidlines