Changed function names to be less confusing.
Fixing function names in tests.