Fix race conditions causing errors in tab completion
Remember whether the shell was open in Sphinx
Fix some CSS warnings