Added assertions.
Changed to use assertions.
Changed to use assertions.
Removed unused assertion.