Fixed unit tests and made them better.