Added some error checking, turned the list nbased number

 generator into a true generator to save memory. Also fixed a bug
caused by improper class property handling.