terminal screen handling and optimisation
