Fix lint errors in specs
Add a fast converting function generator