Cleaned up test functions a bit.