Ctrl+W closes any active tab now
Docstrings added to help code inspection