If it doesn't need to be a method, don't make it a method.
Moved test code out of genfun.js
Just in case, check that the window is actually defined
export an object instead of just Genfun