Clean up code editor code and API. Add tr() and fix spelling.

Moved show/hide folding and margin methods to base class.