Changed generator to be a function for performance
Added debug mode, fixed seed optional