Rewrote assertions and added missing tests