More tests and more bugs fixed.