Separated generator from canvas