Expanded tests.
Removed obsolete code.