Refactored tests a little bit.