Handful of fixes

* Only provide feature after all code has been successfully evaluated
* Declare lexical-binding on the opening line (required for proper effect)
* Rework some docstrings according to checkdoc standards
* Add autoload cookie for interactive function

Some whitespace changes crept into this too, because the initial indentation was inconsistent, but the code itself has not been altered.