Bug fix and more testing...
Lots o code.