FIX GCD!!!
more tests!
move _generate to avoid browserify