Cleanup documentation and remove dead code.
Update line numbers in documentation
Update exception handling.