Converted lazy.js to generics

As used in the DT tester, now moved to main repo