Automatically close compilation windows and some term mode tweaks.