Remove dead code.
Consistency changes.
Make sure to return the function.
cls_checks and tests.