Added new Tests, and fixed some errors in tests