Fixed the autodetection of the terminal width.
Added a setup script to reset the variables describing the terminal
geometry, and added it to the general setup