Some tests, some bug fixes.
Cleaned out redundant tests