Fixed wrong variable naming.
Cleaned up tests.