Added scale unit test, fixed errors caused by cleanup.

Didn't rename the internal scale to _internalScale everywhere...