Fixed issues mentioned in #745. Fixed the bug that caused an UnboundLocalError when using e in an expression more than once. Cleaned up no longer relevant comments and docstrings, and updated the documentation.